package cn.xfdzx.android.apps.shop.contract;

import java.util.Map;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.MoreGoodsBean;
import cn.xfdzx.android.apps.shop.bean.ShopCarListBeen;
import cn.xfdzx.android.apps.shop.bean.ShopRemakeListMarketBean;
import cn.xfdzx.android.apps.shop.bean.XFDGoodsDetailsBeen;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：零售商品详情用到，新发地商品详情用到
 */

public interface XFDGoodsDetailsContract {
    interface Model {
        Flowable<XFDGoodsDetailsBeen> initData(String good_id);
        Flowable<ConfirmGoodBeen> addCar(String is_new, String uniqueId, String productId, String cartNum);


       //零售中商品详情用到
        Flowable<ShopCarListBeen> shopCarList(String store_id, String index_status);

        //批发商品详情-推荐商品
        Flowable<MoreGoodsBean> getStoreGoodsList(Map<String,Object> map);

        //收藏商品
        Flowable<MoreGoodsBean> getGoodsCollection(Map<String,Object> map);

        //取消收藏商品
        Flowable<MoreGoodsBean> getGoodsCancleCollection(Map<String,Object> map);

        //获取店铺评论
        Flowable<ShopRemakeListMarketBean> getShopRemakeMarket(Map<String,Object> map);
    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onInitDataSuccess(XFDGoodsDetailsBeen bean);
        void onAddCarSuccess(ConfirmGoodBeen bean);
        void onShopCarListSuccess(ShopCarListBeen bean);
        void getStoreGoodsListSuccess(MoreGoodsBean bean);
        void getGoodsCollectionSuccess(MoreGoodsBean bean);
        void getGoodsCancleCollectionSuccess(MoreGoodsBean bean);

        void onGetShopRemakeMarketSuccess(ShopRemakeListMarketBean bean);
    }

    interface Presenter {
        /**
         * 首页 市场采购
         *  初始化数据
         */
        void initData(String good_id);
        void addCar(String is_new,String uniqueId,String productId,String cartNum);
        void shopCarList(String store_id,String index_status);
        void getStoreGoodsList(Map<String,Object> map);
        void getGoodsCollection(Map<String,Object> map);
        void getGoodsCancleCollection(Map<String,Object> map);

        void getShopRemakeMarket(Map<String,Object> map);
    }
}
